<%--
  Created by IntelliJ IDEA.
  User: Mr_Liu
  Date: 2022/2/27
  Time: 18:12
  To change this template use File | Settings | File Templates.
--%>
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
        <%@ page import="java.util.List" %>
            <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
                <html>

                <head>
                    <title>Title</title>
                    <link rel="stylesheet" href="css/reset.css">
                    <link rel="stylesheet" href="css/EmpManage.css">
                </head>

                <body>
                    <% List list = (List) request.getAttribute("list");%>
                        <section class="header">
                            <form action="emp_Search" method="get" class="add">
                                用户ID: <input type="text" placeholder="用户ID" name="ID">
                                <button type="submit">搜索</button>
                            </form>
                        </section>

                        <section class="data">
                            <table class="dataTable">
                                <thead>
                                    <tr>
                                        <td>ID</td>
                                        <td>姓名</td>
                                        <td>性别</td>
                                        <td>部门</td>
                                        <td>电话</td>
                                        <td>薪资</td>
                                    </tr>
                                </thead>
                                <tbody>
                                    <c:forEach var="u" items="${list}">
                                        <tr>
                                            <td>
                                                <c:out value="${u.getId()}" />
                                            </td>
                                            <td>
                                                <c:out value="${u.getName()}" />
                                            </td>
                                            <td>
                                                <c:out value="${u.getSex()}" />
                                            </td>
                                            <td>
                                                <c:out value="${u.getDep_name()}" />
                                            </td>
                                            <td>
                                                <c:out value="${u.getPhone()}" />
                                            </td>
                                            <td>
                                                <c:out value="${u.getMoney()}" />
                                            </td>
                                        </tr>
                                    </c:forEach>
                                </tbody>
                            </table>
                        </section>
                </body>

                </html>